package hu.home.arb;

import hu.home.arb.bwin.Bwin;
import hu.home.arb.dao.Dao;
import hu.home.arb.net.Net;

import java.io.IOException;
import java.net.MalformedURLException;
import java.sql.SQLException;

import org.apache.commons.logging.LogFactory;
import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;

import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException;

public class App 
{
	static Logger logger = LogManager.getLogger(App.class.getName());
	static {
        LogFactory.getFactory().setAttribute("org.apache.commons.logging.Log", "org.apache.commons.logging.impl.NoOpLog");
	}
	
	static Net net = new Net();
	
    public static void main( String[] args ) throws FailingHttpStatusCodeException, MalformedURLException, IOException, SQLException, InterruptedException
    {
        logger.info("Start");
                      
        Bwin bwin = new Bwin();
        bwin.start();
        //Bet365 bet365 = new Bet365();
        //bet365.start();
        
        Dao.getConnection().close();
        Net.webClient.closeAllWindows();
        
        logger.info("Stop");        
    }
}
